<template>
	<div class="common-layout">
		<el-form label-width="120px">
			<el-row :gutter="24">
				<el-col :span="12">
					<el-form-item label="地址">
						<el-input v-model="dataFrom.resource" />
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-button size="small" @click="dialogTableVisible = true">获取</el-button>
				</el-col>

				<el-col :span="12">
					<el-form-item label="LON">
						<el-input v-model="dataFrom.lon" />
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="LAT">
						<el-input v-model="dataFrom.lat" />
					</el-form-item>
				</el-col>
			</el-row>
		</el-form>

		<el-dialog v-model="dialogTableVisible" title="获取坐标">
			<!-- <locationmap @pushValue="setValuation"></locationmap> -->
		</el-dialog>
	</div>
</template>

<script >
// import locationmap from '/@/views/linkoo/patrol/locationmap.vue';
import { reactive, ref, toRefs } from 'vue';
export default {
	// components: { locationmap },
	setup() {
		let hhxy = reactive({
			dialogTableVisible: false,
			dataFrom: {
				addr: '',
				lon: '',
				lat: '',
			},
		});
		const setValuation = (data) => {
			hhxy.dataFrom = data;
			hhxy.dialogTableVisible = false;
		};

		return {
			setValuation,
			...toRefs(hhxy),
		};
	},
};
</script>